package com.example.admin.myapplication.activities;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.example.admin.myapplication.BaseView;
import com.example.admin.myapplication.component.DaggerMainActivityComponent;
import com.example.admin.myapplication.component.MainActivityComponent;
import com.example.admin.myapplication.modul.MainPresenterModule;
import com.example.admin.myapplication.presenter.MainPresenter;

import javax.inject.Inject;

/**
 * Created by admin on 2016/4/28.
 */
public abstract class BaseActivity extends AppCompatActivity implements BaseView {

    @Inject
    MainPresenter mainPresenter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initInject(DaggerMainActivityComponent.builder().mainPresenterModule(new MainPresenterModule(this)).build());
    }
    public abstract void initInject(MainActivityComponent mainActivityComponent);
}
